﻿// Copyright (c) Microsoft Corporation.  All rights reserved.
// This source code is made available under the terms of the Microsoft Public License (MS-PL)

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using Renci.iRods.Common;
using Renci.iRods.Data;

namespace Renci.iRods.Linq
{
    /// <summary>
    /// Formats a query expression into TSQL language syntax
    /// </summary>
    public class TSqlFormatter : IRodsQueryFormatter
    {
        private TSqlFormatter()
            : base()
        {
        }

        public static IRodsQuery Format(Expression expression)
        {
            TSqlFormatter formatter = new TSqlFormatter();
            formatter.Visit(expression);
            return formatter.IRodsQuery;
        }

    }
}
